From 5ade60ea7d4770d53ed292ebb714646a06a6776f Mon Sep 17 00:00:00 2001 From: robertlipe Date: Wed, 17 Jul 2013 01:38:35 +0000 Subject: [PATCH] Round fractional time when reading XML beyond milliseoconds. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4443 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/gpx.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gpsbabel/gpx.cc b/gpsbabel/gpx.cc index eda1ff374..166d1280b 100644 --- a/gpsbabel/gpx.cc +++ b/gpsbabel/gpx.cc @@ -22,6 +22,7 @@ #include "defs.h" #include "cet_util.h" #include "garmin_fs.h" +#include #if HAVE_LIBEXPAT #include static XML_Parser psr; @@ -903,7 +904,7 @@ xml_parse_time(const char* cdatastr) // Fractional part of time. if (fsec) { - time = time.addMSecs(fsec * 1000); + time = time.addMSecs(lround(fsec * 1000)); } // Any offsets that were stuck at the end. -- 2.30.2